import { Boolean, Code, CreateDate, Digdit, Entity, GymCourseType, PrimaryUuid, Title } from "@sker/core";

@Entity({ name: 'gym_category' })
export class GymCategory {

    @PrimaryUuid()
    id: string;

    @Title({ label: '分类名称' })
    title: string;

    @GymCourseType({ label: '分类类型' })
    type!: string;

    @Code({ label: '项目类型', default: '' })
    style: string;

    @Boolean({ label: '是否固定时间' })
    is_fixed: boolean;

    @Code({ length: 255, comment: '时间范围' })
    time_range: string;

    @Digdit({ label: '课程时长' })
    length: number;

    @Digdit({ label: '可取消预约', fieldProps: { addonBefore: '开课前', addonAfter: '分钟可取消' } })
    cancel_length: number;

    @CreateDate()
    create_date: Date;
}